#pragma once
// MESSAGE TANK_SYS_STATUS_FEEDBACK PACKING

#define MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK 12919


typedef struct __mavlink_tank_sys_status_feedback_t {
 float motor_speed_l; /*<  float*/
 float motor_speed_r; /*<  float*/
 float motor_current_l; /*<  float*/
 float motor_current_r; /*<  float*/
 float proximity_radar_top; /*<  float*/
 float proximity_radar_bottom; /*<  float*/
 float proximity_radar_left; /*<  float*/
 float proximity_radar_right; /*<  float*/
 float fan_cur; /*<  float*/
 float temp_fan; /*<  float*/
 float system_cur; /*<  float*/
 float system_vol; /*<  float*/
 float pressure; /*<  float*/
 float laser1; /*<  float*/
 float laser2; /*<  float*/
 float laser3; /*<  float*/
 uint32_t erro_code; /*<  uint32_t*/
} mavlink_tank_sys_status_feedback_t;

#define MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_LEN 68
#define MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_MIN_LEN 68
#define MAVLINK_MSG_ID_12919_LEN 68
#define MAVLINK_MSG_ID_12919_MIN_LEN 68

#define MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_CRC 96
#define MAVLINK_MSG_ID_12919_CRC 96



#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_TANK_SYS_STATUS_FEEDBACK { \
    12919, \
    "TANK_SYS_STATUS_FEEDBACK", \
    17, \
    {  { "motor_speed_l", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_tank_sys_status_feedback_t, motor_speed_l) }, \
         { "motor_speed_r", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_tank_sys_status_feedback_t, motor_speed_r) }, \
         { "motor_current_l", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_tank_sys_status_feedback_t, motor_current_l) }, \
         { "motor_current_r", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_tank_sys_status_feedback_t, motor_current_r) }, \
         { "proximity_radar_top", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_tank_sys_status_feedback_t, proximity_radar_top) }, \
         { "proximity_radar_bottom", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_tank_sys_status_feedback_t, proximity_radar_bottom) }, \
         { "proximity_radar_left", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_tank_sys_status_feedback_t, proximity_radar_left) }, \
         { "proximity_radar_right", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_tank_sys_status_feedback_t, proximity_radar_right) }, \
         { "fan_cur", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_tank_sys_status_feedback_t, fan_cur) }, \
         { "temp_fan", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_tank_sys_status_feedback_t, temp_fan) }, \
         { "system_cur", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_tank_sys_status_feedback_t, system_cur) }, \
         { "system_vol", NULL, MAVLINK_TYPE_FLOAT, 0, 44, offsetof(mavlink_tank_sys_status_feedback_t, system_vol) }, \
         { "pressure", NULL, MAVLINK_TYPE_FLOAT, 0, 48, offsetof(mavlink_tank_sys_status_feedback_t, pressure) }, \
         { "laser1", NULL, MAVLINK_TYPE_FLOAT, 0, 52, offsetof(mavlink_tank_sys_status_feedback_t, laser1) }, \
         { "laser2", NULL, MAVLINK_TYPE_FLOAT, 0, 56, offsetof(mavlink_tank_sys_status_feedback_t, laser2) }, \
         { "laser3", NULL, MAVLINK_TYPE_FLOAT, 0, 60, offsetof(mavlink_tank_sys_status_feedback_t, laser3) }, \
         { "erro_code", NULL, MAVLINK_TYPE_UINT32_T, 0, 64, offsetof(mavlink_tank_sys_status_feedback_t, erro_code) }, \
         } \
}
#else
#define MAVLINK_MESSAGE_INFO_TANK_SYS_STATUS_FEEDBACK { \
    "TANK_SYS_STATUS_FEEDBACK", \
    17, \
    {  { "motor_speed_l", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_tank_sys_status_feedback_t, motor_speed_l) }, \
         { "motor_speed_r", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_tank_sys_status_feedback_t, motor_speed_r) }, \
         { "motor_current_l", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_tank_sys_status_feedback_t, motor_current_l) }, \
         { "motor_current_r", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_tank_sys_status_feedback_t, motor_current_r) }, \
         { "proximity_radar_top", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_tank_sys_status_feedback_t, proximity_radar_top) }, \
         { "proximity_radar_bottom", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_tank_sys_status_feedback_t, proximity_radar_bottom) }, \
         { "proximity_radar_left", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_tank_sys_status_feedback_t, proximity_radar_left) }, \
         { "proximity_radar_right", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_tank_sys_status_feedback_t, proximity_radar_right) }, \
         { "fan_cur", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_tank_sys_status_feedback_t, fan_cur) }, \
         { "temp_fan", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_tank_sys_status_feedback_t, temp_fan) }, \
         { "system_cur", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_tank_sys_status_feedback_t, system_cur) }, \
         { "system_vol", NULL, MAVLINK_TYPE_FLOAT, 0, 44, offsetof(mavlink_tank_sys_status_feedback_t, system_vol) }, \
         { "pressure", NULL, MAVLINK_TYPE_FLOAT, 0, 48, offsetof(mavlink_tank_sys_status_feedback_t, pressure) }, \
         { "laser1", NULL, MAVLINK_TYPE_FLOAT, 0, 52, offsetof(mavlink_tank_sys_status_feedback_t, laser1) }, \
         { "laser2", NULL, MAVLINK_TYPE_FLOAT, 0, 56, offsetof(mavlink_tank_sys_status_feedback_t, laser2) }, \
         { "laser3", NULL, MAVLINK_TYPE_FLOAT, 0, 60, offsetof(mavlink_tank_sys_status_feedback_t, laser3) }, \
         { "erro_code", NULL, MAVLINK_TYPE_UINT32_T, 0, 64, offsetof(mavlink_tank_sys_status_feedback_t, erro_code) }, \
         } \
}
#endif

/**
 * @brief Pack a tank_sys_status_feedback message
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 *
 * @param motor_speed_l  float
 * @param motor_speed_r  float
 * @param motor_current_l  float
 * @param motor_current_r  float
 * @param proximity_radar_top  float
 * @param proximity_radar_bottom  float
 * @param proximity_radar_left  float
 * @param proximity_radar_right  float
 * @param fan_cur  float
 * @param temp_fan  float
 * @param system_cur  float
 * @param system_vol  float
 * @param pressure  float
 * @param laser1  float
 * @param laser2  float
 * @param laser3  float
 * @param erro_code  uint32_t
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_tank_sys_status_feedback_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
                               float motor_speed_l, float motor_speed_r, float motor_current_l, float motor_current_r, float proximity_radar_top, float proximity_radar_bottom, float proximity_radar_left, float proximity_radar_right, float fan_cur, float temp_fan, float system_cur, float system_vol, float pressure, float laser1, float laser2, float laser3, uint32_t erro_code)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_LEN];
    _mav_put_float(buf, 0, motor_speed_l);
    _mav_put_float(buf, 4, motor_speed_r);
    _mav_put_float(buf, 8, motor_current_l);
    _mav_put_float(buf, 12, motor_current_r);
    _mav_put_float(buf, 16, proximity_radar_top);
    _mav_put_float(buf, 20, proximity_radar_bottom);
    _mav_put_float(buf, 24, proximity_radar_left);
    _mav_put_float(buf, 28, proximity_radar_right);
    _mav_put_float(buf, 32, fan_cur);
    _mav_put_float(buf, 36, temp_fan);
    _mav_put_float(buf, 40, system_cur);
    _mav_put_float(buf, 44, system_vol);
    _mav_put_float(buf, 48, pressure);
    _mav_put_float(buf, 52, laser1);
    _mav_put_float(buf, 56, laser2);
    _mav_put_float(buf, 60, laser3);
    _mav_put_uint32_t(buf, 64, erro_code);

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_LEN);
#else
    mavlink_tank_sys_status_feedback_t packet;
    packet.motor_speed_l = motor_speed_l;
    packet.motor_speed_r = motor_speed_r;
    packet.motor_current_l = motor_current_l;
    packet.motor_current_r = motor_current_r;
    packet.proximity_radar_top = proximity_radar_top;
    packet.proximity_radar_bottom = proximity_radar_bottom;
    packet.proximity_radar_left = proximity_radar_left;
    packet.proximity_radar_right = proximity_radar_right;
    packet.fan_cur = fan_cur;
    packet.temp_fan = temp_fan;
    packet.system_cur = system_cur;
    packet.system_vol = system_vol;
    packet.pressure = pressure;
    packet.laser1 = laser1;
    packet.laser2 = laser2;
    packet.laser3 = laser3;
    packet.erro_code = erro_code;

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_LEN);
#endif

    msg->msgid = MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK;
    return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_MIN_LEN, MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_LEN, MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_CRC);
}

/**
 * @brief Pack a tank_sys_status_feedback message on a channel
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param chan The MAVLink channel this message will be sent over
 * @param msg The MAVLink message to compress the data into
 * @param motor_speed_l  float
 * @param motor_speed_r  float
 * @param motor_current_l  float
 * @param motor_current_r  float
 * @param proximity_radar_top  float
 * @param proximity_radar_bottom  float
 * @param proximity_radar_left  float
 * @param proximity_radar_right  float
 * @param fan_cur  float
 * @param temp_fan  float
 * @param system_cur  float
 * @param system_vol  float
 * @param pressure  float
 * @param laser1  float
 * @param laser2  float
 * @param laser3  float
 * @param erro_code  uint32_t
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_tank_sys_status_feedback_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
                               mavlink_message_t* msg,
                                   float motor_speed_l,float motor_speed_r,float motor_current_l,float motor_current_r,float proximity_radar_top,float proximity_radar_bottom,float proximity_radar_left,float proximity_radar_right,float fan_cur,float temp_fan,float system_cur,float system_vol,float pressure,float laser1,float laser2,float laser3,uint32_t erro_code)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_LEN];
    _mav_put_float(buf, 0, motor_speed_l);
    _mav_put_float(buf, 4, motor_speed_r);
    _mav_put_float(buf, 8, motor_current_l);
    _mav_put_float(buf, 12, motor_current_r);
    _mav_put_float(buf, 16, proximity_radar_top);
    _mav_put_float(buf, 20, proximity_radar_bottom);
    _mav_put_float(buf, 24, proximity_radar_left);
    _mav_put_float(buf, 28, proximity_radar_right);
    _mav_put_float(buf, 32, fan_cur);
    _mav_put_float(buf, 36, temp_fan);
    _mav_put_float(buf, 40, system_cur);
    _mav_put_float(buf, 44, system_vol);
    _mav_put_float(buf, 48, pressure);
    _mav_put_float(buf, 52, laser1);
    _mav_put_float(buf, 56, laser2);
    _mav_put_float(buf, 60, laser3);
    _mav_put_uint32_t(buf, 64, erro_code);

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_LEN);
#else
    mavlink_tank_sys_status_feedback_t packet;
    packet.motor_speed_l = motor_speed_l;
    packet.motor_speed_r = motor_speed_r;
    packet.motor_current_l = motor_current_l;
    packet.motor_current_r = motor_current_r;
    packet.proximity_radar_top = proximity_radar_top;
    packet.proximity_radar_bottom = proximity_radar_bottom;
    packet.proximity_radar_left = proximity_radar_left;
    packet.proximity_radar_right = proximity_radar_right;
    packet.fan_cur = fan_cur;
    packet.temp_fan = temp_fan;
    packet.system_cur = system_cur;
    packet.system_vol = system_vol;
    packet.pressure = pressure;
    packet.laser1 = laser1;
    packet.laser2 = laser2;
    packet.laser3 = laser3;
    packet.erro_code = erro_code;

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_LEN);
#endif

    msg->msgid = MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK;
    return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_MIN_LEN, MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_LEN, MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_CRC);
}

/**
 * @brief Encode a tank_sys_status_feedback struct
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 * @param tank_sys_status_feedback C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_tank_sys_status_feedback_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_tank_sys_status_feedback_t* tank_sys_status_feedback)
{
    return mavlink_msg_tank_sys_status_feedback_pack(system_id, component_id, msg, tank_sys_status_feedback->motor_speed_l, tank_sys_status_feedback->motor_speed_r, tank_sys_status_feedback->motor_current_l, tank_sys_status_feedback->motor_current_r, tank_sys_status_feedback->proximity_radar_top, tank_sys_status_feedback->proximity_radar_bottom, tank_sys_status_feedback->proximity_radar_left, tank_sys_status_feedback->proximity_radar_right, tank_sys_status_feedback->fan_cur, tank_sys_status_feedback->temp_fan, tank_sys_status_feedback->system_cur, tank_sys_status_feedback->system_vol, tank_sys_status_feedback->pressure, tank_sys_status_feedback->laser1, tank_sys_status_feedback->laser2, tank_sys_status_feedback->laser3, tank_sys_status_feedback->erro_code);
}

/**
 * @brief Encode a tank_sys_status_feedback struct on a channel
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param chan The MAVLink channel this message will be sent over
 * @param msg The MAVLink message to compress the data into
 * @param tank_sys_status_feedback C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_tank_sys_status_feedback_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_tank_sys_status_feedback_t* tank_sys_status_feedback)
{
    return mavlink_msg_tank_sys_status_feedback_pack_chan(system_id, component_id, chan, msg, tank_sys_status_feedback->motor_speed_l, tank_sys_status_feedback->motor_speed_r, tank_sys_status_feedback->motor_current_l, tank_sys_status_feedback->motor_current_r, tank_sys_status_feedback->proximity_radar_top, tank_sys_status_feedback->proximity_radar_bottom, tank_sys_status_feedback->proximity_radar_left, tank_sys_status_feedback->proximity_radar_right, tank_sys_status_feedback->fan_cur, tank_sys_status_feedback->temp_fan, tank_sys_status_feedback->system_cur, tank_sys_status_feedback->system_vol, tank_sys_status_feedback->pressure, tank_sys_status_feedback->laser1, tank_sys_status_feedback->laser2, tank_sys_status_feedback->laser3, tank_sys_status_feedback->erro_code);
}

/**
 * @brief Send a tank_sys_status_feedback message
 * @param chan MAVLink channel to send the message
 *
 * @param motor_speed_l  float
 * @param motor_speed_r  float
 * @param motor_current_l  float
 * @param motor_current_r  float
 * @param proximity_radar_top  float
 * @param proximity_radar_bottom  float
 * @param proximity_radar_left  float
 * @param proximity_radar_right  float
 * @param fan_cur  float
 * @param temp_fan  float
 * @param system_cur  float
 * @param system_vol  float
 * @param pressure  float
 * @param laser1  float
 * @param laser2  float
 * @param laser3  float
 * @param erro_code  uint32_t
 */
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS

static inline void mavlink_msg_tank_sys_status_feedback_send(mavlink_channel_t chan, float motor_speed_l, float motor_speed_r, float motor_current_l, float motor_current_r, float proximity_radar_top, float proximity_radar_bottom, float proximity_radar_left, float proximity_radar_right, float fan_cur, float temp_fan, float system_cur, float system_vol, float pressure, float laser1, float laser2, float laser3, uint32_t erro_code)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_LEN];
    _mav_put_float(buf, 0, motor_speed_l);
    _mav_put_float(buf, 4, motor_speed_r);
    _mav_put_float(buf, 8, motor_current_l);
    _mav_put_float(buf, 12, motor_current_r);
    _mav_put_float(buf, 16, proximity_radar_top);
    _mav_put_float(buf, 20, proximity_radar_bottom);
    _mav_put_float(buf, 24, proximity_radar_left);
    _mav_put_float(buf, 28, proximity_radar_right);
    _mav_put_float(buf, 32, fan_cur);
    _mav_put_float(buf, 36, temp_fan);
    _mav_put_float(buf, 40, system_cur);
    _mav_put_float(buf, 44, system_vol);
    _mav_put_float(buf, 48, pressure);
    _mav_put_float(buf, 52, laser1);
    _mav_put_float(buf, 56, laser2);
    _mav_put_float(buf, 60, laser3);
    _mav_put_uint32_t(buf, 64, erro_code);

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK, buf, MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_MIN_LEN, MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_LEN, MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_CRC);
#else
    mavlink_tank_sys_status_feedback_t packet;
    packet.motor_speed_l = motor_speed_l;
    packet.motor_speed_r = motor_speed_r;
    packet.motor_current_l = motor_current_l;
    packet.motor_current_r = motor_current_r;
    packet.proximity_radar_top = proximity_radar_top;
    packet.proximity_radar_bottom = proximity_radar_bottom;
    packet.proximity_radar_left = proximity_radar_left;
    packet.proximity_radar_right = proximity_radar_right;
    packet.fan_cur = fan_cur;
    packet.temp_fan = temp_fan;
    packet.system_cur = system_cur;
    packet.system_vol = system_vol;
    packet.pressure = pressure;
    packet.laser1 = laser1;
    packet.laser2 = laser2;
    packet.laser3 = laser3;
    packet.erro_code = erro_code;

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK, (const char *)&packet, MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_MIN_LEN, MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_LEN, MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_CRC);
#endif
}

/**
 * @brief Send a tank_sys_status_feedback message
 * @param chan MAVLink channel to send the message
 * @param struct The MAVLink struct to serialize
 */
static inline void mavlink_msg_tank_sys_status_feedback_send_struct(mavlink_channel_t chan, const mavlink_tank_sys_status_feedback_t* tank_sys_status_feedback)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    mavlink_msg_tank_sys_status_feedback_send(chan, tank_sys_status_feedback->motor_speed_l, tank_sys_status_feedback->motor_speed_r, tank_sys_status_feedback->motor_current_l, tank_sys_status_feedback->motor_current_r, tank_sys_status_feedback->proximity_radar_top, tank_sys_status_feedback->proximity_radar_bottom, tank_sys_status_feedback->proximity_radar_left, tank_sys_status_feedback->proximity_radar_right, tank_sys_status_feedback->fan_cur, tank_sys_status_feedback->temp_fan, tank_sys_status_feedback->system_cur, tank_sys_status_feedback->system_vol, tank_sys_status_feedback->pressure, tank_sys_status_feedback->laser1, tank_sys_status_feedback->laser2, tank_sys_status_feedback->laser3, tank_sys_status_feedback->erro_code);
#else
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK, (const char *)tank_sys_status_feedback, MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_MIN_LEN, MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_LEN, MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_CRC);
#endif
}

#if MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
  This variant of _send() can be used to save stack space by re-using
  memory from the receive buffer.  The caller provides a
  mavlink_message_t which is the size of a full mavlink message. This
  is usually the receive buffer for the channel, and allows a reply to an
  incoming message with minimum stack space usage.
 */
static inline void mavlink_msg_tank_sys_status_feedback_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan,  float motor_speed_l, float motor_speed_r, float motor_current_l, float motor_current_r, float proximity_radar_top, float proximity_radar_bottom, float proximity_radar_left, float proximity_radar_right, float fan_cur, float temp_fan, float system_cur, float system_vol, float pressure, float laser1, float laser2, float laser3, uint32_t erro_code)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char *buf = (char *)msgbuf;
    _mav_put_float(buf, 0, motor_speed_l);
    _mav_put_float(buf, 4, motor_speed_r);
    _mav_put_float(buf, 8, motor_current_l);
    _mav_put_float(buf, 12, motor_current_r);
    _mav_put_float(buf, 16, proximity_radar_top);
    _mav_put_float(buf, 20, proximity_radar_bottom);
    _mav_put_float(buf, 24, proximity_radar_left);
    _mav_put_float(buf, 28, proximity_radar_right);
    _mav_put_float(buf, 32, fan_cur);
    _mav_put_float(buf, 36, temp_fan);
    _mav_put_float(buf, 40, system_cur);
    _mav_put_float(buf, 44, system_vol);
    _mav_put_float(buf, 48, pressure);
    _mav_put_float(buf, 52, laser1);
    _mav_put_float(buf, 56, laser2);
    _mav_put_float(buf, 60, laser3);
    _mav_put_uint32_t(buf, 64, erro_code);

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK, buf, MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_MIN_LEN, MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_LEN, MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_CRC);
#else
    mavlink_tank_sys_status_feedback_t *packet = (mavlink_tank_sys_status_feedback_t *)msgbuf;
    packet->motor_speed_l = motor_speed_l;
    packet->motor_speed_r = motor_speed_r;
    packet->motor_current_l = motor_current_l;
    packet->motor_current_r = motor_current_r;
    packet->proximity_radar_top = proximity_radar_top;
    packet->proximity_radar_bottom = proximity_radar_bottom;
    packet->proximity_radar_left = proximity_radar_left;
    packet->proximity_radar_right = proximity_radar_right;
    packet->fan_cur = fan_cur;
    packet->temp_fan = temp_fan;
    packet->system_cur = system_cur;
    packet->system_vol = system_vol;
    packet->pressure = pressure;
    packet->laser1 = laser1;
    packet->laser2 = laser2;
    packet->laser3 = laser3;
    packet->erro_code = erro_code;

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK, (const char *)packet, MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_MIN_LEN, MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_LEN, MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_CRC);
#endif
}
#endif

#endif

// MESSAGE TANK_SYS_STATUS_FEEDBACK UNPACKING


/**
 * @brief Get field motor_speed_l from tank_sys_status_feedback message
 *
 * @return  float
 */
static inline float mavlink_msg_tank_sys_status_feedback_get_motor_speed_l(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  0);
}

/**
 * @brief Get field motor_speed_r from tank_sys_status_feedback message
 *
 * @return  float
 */
static inline float mavlink_msg_tank_sys_status_feedback_get_motor_speed_r(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  4);
}

/**
 * @brief Get field motor_current_l from tank_sys_status_feedback message
 *
 * @return  float
 */
static inline float mavlink_msg_tank_sys_status_feedback_get_motor_current_l(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  8);
}

/**
 * @brief Get field motor_current_r from tank_sys_status_feedback message
 *
 * @return  float
 */
static inline float mavlink_msg_tank_sys_status_feedback_get_motor_current_r(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  12);
}

/**
 * @brief Get field proximity_radar_top from tank_sys_status_feedback message
 *
 * @return  float
 */
static inline float mavlink_msg_tank_sys_status_feedback_get_proximity_radar_top(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  16);
}

/**
 * @brief Get field proximity_radar_bottom from tank_sys_status_feedback message
 *
 * @return  float
 */
static inline float mavlink_msg_tank_sys_status_feedback_get_proximity_radar_bottom(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  20);
}

/**
 * @brief Get field proximity_radar_left from tank_sys_status_feedback message
 *
 * @return  float
 */
static inline float mavlink_msg_tank_sys_status_feedback_get_proximity_radar_left(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  24);
}

/**
 * @brief Get field proximity_radar_right from tank_sys_status_feedback message
 *
 * @return  float
 */
static inline float mavlink_msg_tank_sys_status_feedback_get_proximity_radar_right(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  28);
}

/**
 * @brief Get field fan_cur from tank_sys_status_feedback message
 *
 * @return  float
 */
static inline float mavlink_msg_tank_sys_status_feedback_get_fan_cur(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  32);
}

/**
 * @brief Get field temp_fan from tank_sys_status_feedback message
 *
 * @return  float
 */
static inline float mavlink_msg_tank_sys_status_feedback_get_temp_fan(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  36);
}

/**
 * @brief Get field system_cur from tank_sys_status_feedback message
 *
 * @return  float
 */
static inline float mavlink_msg_tank_sys_status_feedback_get_system_cur(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  40);
}

/**
 * @brief Get field system_vol from tank_sys_status_feedback message
 *
 * @return  float
 */
static inline float mavlink_msg_tank_sys_status_feedback_get_system_vol(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  44);
}

/**
 * @brief Get field pressure from tank_sys_status_feedback message
 *
 * @return  float
 */
static inline float mavlink_msg_tank_sys_status_feedback_get_pressure(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  48);
}

/**
 * @brief Get field laser1 from tank_sys_status_feedback message
 *
 * @return  float
 */
static inline float mavlink_msg_tank_sys_status_feedback_get_laser1(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  52);
}

/**
 * @brief Get field laser2 from tank_sys_status_feedback message
 *
 * @return  float
 */
static inline float mavlink_msg_tank_sys_status_feedback_get_laser2(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  56);
}

/**
 * @brief Get field laser3 from tank_sys_status_feedback message
 *
 * @return  float
 */
static inline float mavlink_msg_tank_sys_status_feedback_get_laser3(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  60);
}

/**
 * @brief Get field erro_code from tank_sys_status_feedback message
 *
 * @return  uint32_t
 */
static inline uint32_t mavlink_msg_tank_sys_status_feedback_get_erro_code(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint32_t(msg,  64);
}

/**
 * @brief Decode a tank_sys_status_feedback message into a struct
 *
 * @param msg The message to decode
 * @param tank_sys_status_feedback C-struct to decode the message contents into
 */
static inline void mavlink_msg_tank_sys_status_feedback_decode(const mavlink_message_t* msg, mavlink_tank_sys_status_feedback_t* tank_sys_status_feedback)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    tank_sys_status_feedback->motor_speed_l = mavlink_msg_tank_sys_status_feedback_get_motor_speed_l(msg);
    tank_sys_status_feedback->motor_speed_r = mavlink_msg_tank_sys_status_feedback_get_motor_speed_r(msg);
    tank_sys_status_feedback->motor_current_l = mavlink_msg_tank_sys_status_feedback_get_motor_current_l(msg);
    tank_sys_status_feedback->motor_current_r = mavlink_msg_tank_sys_status_feedback_get_motor_current_r(msg);
    tank_sys_status_feedback->proximity_radar_top = mavlink_msg_tank_sys_status_feedback_get_proximity_radar_top(msg);
    tank_sys_status_feedback->proximity_radar_bottom = mavlink_msg_tank_sys_status_feedback_get_proximity_radar_bottom(msg);
    tank_sys_status_feedback->proximity_radar_left = mavlink_msg_tank_sys_status_feedback_get_proximity_radar_left(msg);
    tank_sys_status_feedback->proximity_radar_right = mavlink_msg_tank_sys_status_feedback_get_proximity_radar_right(msg);
    tank_sys_status_feedback->fan_cur = mavlink_msg_tank_sys_status_feedback_get_fan_cur(msg);
    tank_sys_status_feedback->temp_fan = mavlink_msg_tank_sys_status_feedback_get_temp_fan(msg);
    tank_sys_status_feedback->system_cur = mavlink_msg_tank_sys_status_feedback_get_system_cur(msg);
    tank_sys_status_feedback->system_vol = mavlink_msg_tank_sys_status_feedback_get_system_vol(msg);
    tank_sys_status_feedback->pressure = mavlink_msg_tank_sys_status_feedback_get_pressure(msg);
    tank_sys_status_feedback->laser1 = mavlink_msg_tank_sys_status_feedback_get_laser1(msg);
    tank_sys_status_feedback->laser2 = mavlink_msg_tank_sys_status_feedback_get_laser2(msg);
    tank_sys_status_feedback->laser3 = mavlink_msg_tank_sys_status_feedback_get_laser3(msg);
    tank_sys_status_feedback->erro_code = mavlink_msg_tank_sys_status_feedback_get_erro_code(msg);
#else
        uint8_t len = msg->len < MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_LEN? msg->len : MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_LEN;
        memset(tank_sys_status_feedback, 0, MAVLINK_MSG_ID_TANK_SYS_STATUS_FEEDBACK_LEN);
    memcpy(tank_sys_status_feedback, _MAV_PAYLOAD(msg), len);
#endif
}
